home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / A-B / AutoCat.cpt / AutoCat / card_6151.txt < prev    next >
Text File  |  1989-02-26  |  4KB  |  133 lines

  1. -- card: 6151 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2726
  5. -- name: AutoCat Index
  6.  
  7.  
  8. -- part 396 (field)
  9. -- low flags: 80
  10. -- high flags: 0002
  11. -- rect: left=155 top=266 right=333 bottom=215
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Hold Globals
  20.  
  21.  
  22. -- part 450 (button)
  23. -- low flags: 00
  24. -- high flags: A000
  25. -- rect: left=36 top=65 right=120 bottom=91
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 24438 / 24438
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: Box #1
  34. ----- HyperTalk script -----
  35. on mouseUp
  36.   global hardDisk
  37.   put "Box #1 1" into cardNm
  38.   put "Box #1.Index" into indCardNm
  39.   put "Box #1" into boxName
  40.   put false into hardDisk
  41.  
  42.   --generic button script
  43.   put false into flag
  44.   put the ticks into originalTicks
  45.  
  46.   repeat until the mouseClick -- flag a single click
  47.     if the ticks - originalTicks > 30 then
  48.       put true into flag -- single click
  49.       exit repeat
  50.     end if
  51.   end repeat
  52.   visual effect iris open
  53.  
  54.   --begin with creating a box index card
  55.   set cursor to 4
  56.   put the ID of this card into toHome -- store this index card
  57.   put false into frstCrd
  58.   if flag contains false then -- double click
  59.     go to card CardNm -- first disk catalog card of box
  60.     if the result is not empty then
  61.       go to card indCardNm
  62.     end if
  63.   else -- single click
  64.     go to card indCardNm -- box index card
  65.   end if
  66.  
  67.   if the result is not empty then
  68.     put true into frstCrd -- they don't exist yet
  69.     set lockMessages to true
  70.     set lockScreen to true
  71.     go to card id 5366 -- box index template
  72.     doMenu New Card
  73.     set the name of this card to indCardNm
  74.     put boxName into bkgnd field "Box Name"
  75.     put third word of toHome into bkgnd field "IndexCardID" -- index card
  76.     if hardDisk contains true then
  77.       put "true" into bkgnd field "Hard Disk?" -- floppy or HD box
  78.     else
  79.       put "false" into bkgnd field "Hard Disk?"
  80.     end if
  81.     set lockMessages to false
  82.   end if
  83.  
  84.   --create and go to first disk card if this is a new box
  85.   if frstCrd contains true then
  86.  
  87.     -- start a new set of cards for the box
  88.     go to card cardNm
  89.     if the result is not empty then
  90.       set lockMessages to true
  91.       go to card id 3043
  92.       doMenu New Card
  93.       set the name of this card to cardNm
  94.       put word 1 to (the number of words in cardNm -1) of cardNm into bkgnd field "Box Name" of card cardNm -- index which box
  95.       put 1 into bkgnd field "PageOfBox" of card cardNm -- which disk number
  96.       -- which Index Box
  97.       put indCardNm into bkgnd field "Box Card" of card cardNm
  98.       if hardDisk contains true then -- Hard Disk?
  99.         put "true" into bkgnd field "Hard Disk?"
  100.         put "Page#:" into bkgnd field "Name Of Page"
  101.       else
  102.         put "false" into bkgnd field "Hard Disk?"
  103.         put "Disk#:" into bkgnd field "Name Of Page"
  104.       end if
  105.  
  106.       -- create an opaque button to cover up the arrow pointing to previous
  107.       -- card since this is the first disk catalog page and there will be no
  108.       -- previous disk catalog page
  109.       doMenu New Button
  110.       set rect of button "New Button" to 159,313,185,336
  111.       set style of button "New Button" to opaque
  112.       set showName of button "New Button" to false
  113.       set name of button "New Button" to "Cover Prev"
  114.       choose browse tool
  115.       set lockScreen to false
  116.       go to  card cardNm
  117.       --call ReadAutoCat
  118.       send openCard to card cardNm
  119.     end if
  120.   end if
  121. end mouseUp
  122.  
  123.  
  124.  
  125. -- part contents for background part 5
  126. ----- text -----
  127. 1
  128.  
  129. -- part contents for card part 396
  130. ----- text -----
  131. Stuff
  132.        5
  133.        3